package top.lgd.pojo.entity.person;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import top.lgd.base.LgdEntity;

import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 个人账户流水表
 *
 * @author YYJ
 * @version 1.0
 * @since 2024/5/6 14:42
 */
@Getter
@Setter
@TableName("person_account_flow")
public class AccountFlow extends LgdEntity {

    /**
     * 账户ID
     * Index
     */
    private Long accountId;

    /**
     * 账户属性（A资产 D负债）
     */
    @Size(max = 1)
    private String accountAttr;

    /**
     * 流水类型（IN-借|OUT-贷）
     */
    @Size(max = 4)
    private String flowType;

    /**
     * 变动日期
     * Index
     */
    private LocalDate flowDate;

    /**
     * 变动前金额
     */
    private BigDecimal beforeAmount;

    /**
     * 变动金额
     */
    private BigDecimal flowAmount;

    /**
     * 变动后金额
     */
    private BigDecimal afterAmount;

    /**
     * 交易对方账户ID
     */
    private Long tradeAccountId;

    /**
     * 业务流水号
     */
    @Size(max = 32)
    private String bizNo;

    /**
     * 业务描述
     */
    @Size(max = 64)
    private String bizDesc;
}